package com.example.administrator.myapplication;


import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.Toast;

public class Main2Activity extends BaseActivity implements View.OnClickListener{

    private ImageView mIvLeft;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setFullScreen();
        setContentView(R.layout.activity_main2);

        initTitleBar(R.drawable.icon_left, "第二个界面", R.mipmap.ic_launcher, this);
        mIvLeft = (ImageView) findViewById(R.id.iv_left);

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.iv_left:
                finish();
                break;
            case R.id.iv_right:
                Toast.makeText(this,"你点击了右边的图标",Toast.LENGTH_SHORT).show();
                break;
        }
    }
}
